$(function()
{
	$("*[data-toggle='tooltip']").tooltip();

	$(".dashboard .panel .info").equalHeights();

	$(".help").popover();

	$(".datepicker").datepicker({
		format:"dd/mm/yyyy"
	});
});

var uploadButton = $('<a/>')
	.addClass('btn btn-primary btn-xs')
	.prop('disabled', true)
	.text('Processing...')
	.on('click', function () {
		var $this = $(this),
			data = $this.data();
		$this
			.off('click')
			.text('Abort')
			.on('click', function () {
				$this.remove();
				data.abort();
			});
		data.submit().always(function () {
			$this.remove();
		});
	});